
public class Line implements Iterable {

    String contents;
    Line( String line )
    {
        contents = line;
    }

    //Returns the first character of the string.
    public String getFirstChar()
    {
        //If there is no content return an empty space. We do this
        //because we always need something.
        if( contents.equals( "" ))
            return " ";
        return contents.substring( 0, 1 );
    }

    //Gets a iterator to get a iterator for each line.
    public LineIterator iterator() {
        //Get an iterator for the contents that were passed to us.
        LineIterator i = new LineIterator( contents );
        return i; 

    }
}
